﻿#ifndef __FINALIZER__H__
#define __FINALIZER__H__
#include <functional>
class Finalizer
{
public:
	Finalizer(std::function<void()> finalizer);
	~Finalizer();

	inline void Release()
	{
		m_finalizer = EmptyFunc;
	}

private:
	static inline void EmptyFunc() {}

private:
	std::function<void()> m_finalizer;
};
#endif//__FINALIZER__H__